package com.vf.user.domain.DTO;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class RegisterDTO {

//    @NotNull(message = "手机号不能为空")
//    @Pattern(regexp = "^(?:(?:\\+|00)86)?1[3-9]\\d{9}$", message = "手机号格式错误")
    @ApiModelProperty(value = "手机号")
    private String phonenumber;

    @NotNull(message = "密码不能为空")
//    @Pattern(
//            regexp = "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)\\S{6,12}$",
//            message = "密码必须6-12位，且必须带大小写英文字母和数字"
//    )
    @ApiModelProperty(value = "密码")
    private String password;

//    @Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", message = "邮箱格式错误")
    @ApiModelProperty(value = "邮箱")
    private String email;

//    @NotNull(message = "验证码不能为空")
//    @Length(max = 6, min = 6, message = "验证码长度必须为6位")
    private String code;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "用户ID")
    private Long userId;
}
